<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="点击" id="btn" onclick="doClick()">
</body>
<script>
    // import c from "./click.js";

    let c;

    // import()，动态加载，返回一个Promise对象。
    import("./click.js").then(res => {
        c = res.default;
    })
    
    function doClick() {
        c();
    }
    
</script>
</html>